/*
 * @Author: liuxiao
 * @Date: 2023-11-12 00:03:07
 * @Last Modified by: liuxiao
 * @Last Modified time: 2023-11-12 00:46:15
 * @ps:用户相关接口数据类型设置
 */

//登录接口需要携带参数ts类型
export interface loginFormData {
  username: string
  password: string
}

//定义全部接口返回的数据类型都拥有ts类型
export interface ResponseData {
  code: number
  msg: string
  result?: any
}

interface tokenType {
  token: string
}

//定义登录接口返回的数据类型
export interface loginResponseData extends ResponseData {
  data: tokenType
}
//定义获取用户信息返回的数据类型
export interface userInfoResponseData extends ResponseData {
  data: {
    routes: string[]
    butons: string[]
    roles: string[]
    name: string
    avatar: string
  }
}

// 错误提示
export interface errorMessage {
  username?: string
  password?: string
}
